﻿using System.Configuration;
using Sautom.DataAccess.Helpers;
using Sautom.DataAccess.Helpers.Templates;

namespace Sautom.CompositionRoot
{
    public static class Root
    {
        private static IDependencyResolver _dependencyResolver;
        public static IDependencyResolver DependencyResolver
        {
            get { return _dependencyResolver; }
        }

        public static void Configure()
        {
            _dependencyResolver = new UnityDependencyResolver();

            string templatesPath = ConfigurationManager.AppSettings["DocxTemplatesFolderPath"];

            TemplateProcessor.Register("ConsultingInfo", new ConsultingInfo(templatesPath));
            TemplateProcessor.Register("WorkshopInfo", new WorkshopInfo(templatesPath));
            TemplateProcessor.Register("OrderDetails", new OrderDetails(templatesPath));
        }
    }
}
